feat(providers/azure/managed-redis): add Azure Managed Redis service client (closes #556) - #620
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds Azure Cache for Redis (ServiceMemoryDB) support: provider wiring, a ManagedRedisClient implementing discovery, recommendations, existing commitments, purchase execution, pricing/offering details, and a comprehensive mocked test suite. ChangesAzure Cache for Redis Service Implementation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
providers/azure/services/managedredis/client_test.go (1)
541-552: ⚡ Quick winStrengthen conversion test with non-empty Azure payload assertions.
Current test validates only default/static fields from a nil input, so payload-to-recommendation mapping regressions won’t be detected.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@providers/azure/services/managedredis/client_test.go` around lines 541 - 552, TestConvertRecommendation currently calls convertRecommendation with nil, only asserting defaults; update the test to supply a realistic, non-nil Azure recommendation payload and assert that fields are mapped correctly. Construct a sample payload object matching the type expected by convertRecommendation (populate unique fields like RecommendationId/ID, InstanceType/SKU, Term, PaymentOption, Region, SubscriptionID/Account, CommitmentType), call c.convertRecommendation(ctx, payload), and add assertions that the returned rec contains the corresponding values (check Provider, Service, Account, Region, CommitmentType, Term, PaymentOption and at least one payload-derived identifier or SKU field) to catch regressions in mapping. Ensure you reference the NewClient and convertRecommendation helpers already used in the test.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@providers/azure/services/managedredis/client.go`:
- Around line 190-192: The reservationDetailsPager function is hardcoding the
reservation order ID ("00000000-0000-0000-0000-000000000000") which prevents
GetExistingCommitments from discovering real reservations; change the
implementation to first enumerate actual reservation orders for the subscription
(or accept a reservationOrderID param) and pass each real order ID into
client.NewListByReservationOrderPager (instead of the synthetic GUID) so
reservationDetailsPager iterates real orders and returns details for actual
reservation commitments.
- Around line 529-539: convertRecommendation currently ignores its
armconsumption.ReservationRecommendationClassification input and returns a
static Recommendation; update ManagedRedisClient.convertRecommendation to read
the incoming recommendation payload (the function parameter), extract
SKU/instance type, recommended quantity/count, estimated cost/pricing and
term/payment details from the classification object and populate the
corresponding fields on common.Recommendation (e.g., SKU/InstanceType,
Quantity/Count, EstimatedCost/MonthlyCost, Term, PaymentOption) instead of
hardcoding values; preserve existing fields like Provider, Service, Account,
Region, CommitmentType and Timestamp while mapping any available pricing/usage
metadata from the classification into the Recommendation so downstream
validation/pricing uses the real data.
- Around line 229-233: The reservationOrderID generation using time.Now().Unix()
(variable reservationOrderID in providers/azure/services/managedredis/client.go)
can collide under concurrent purchases; change it to use a high-entropy unique
value (e.g., append a UUID or use time.Now().UnixNano() or a crypto-random
suffix) when building reservationOrderID and purchaseURL so each
reservationOrderID is globally unique; update the creation of reservationOrderID
and any dependent code that expects that string (reservationOrderID and
purchaseURL) to use the new unique format.
- Around line 160-169: The code currently hides reservation API failures by
returning an empty commitments slice on pager creation error and breaking
silently on pager.NextPage errors; update reservationDetailsPager() error
handling to return the error (e.g., return nil, err) instead of commitments,
nil, and change the pager iteration that handles page retrieval (pager.NextPage)
to propagate the error (return nil, err or a wrapped error) rather than breaking
the loop so callers can distinguish real API/auth failures from a true "no
commitments" result; refer to reservationDetailsPager, pager.NextPage, and the
commitments return value when making the change.
---
Nitpick comments:
In `@providers/azure/services/managedredis/client_test.go`:
- Around line 541-552: TestConvertRecommendation currently calls
convertRecommendation with nil, only asserting defaults; update the test to
supply a realistic, non-nil Azure recommendation payload and assert that fields
are mapped correctly. Construct a sample payload object matching the type
expected by convertRecommendation (populate unique fields like
RecommendationId/ID, InstanceType/SKU, Term, PaymentOption, Region,
SubscriptionID/Account, CommitmentType), call c.convertRecommendation(ctx,
payload), and add assertions that the returned rec contains the corresponding
values (check Provider, Service, Account, Region, CommitmentType, Term,
PaymentOption and at least one payload-derived identifier or SKU field) to catch
regressions in mapping. Ensure you reference the NewClient and
convertRecommendation helpers already used in the test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bb58da09-c5bf-4de5-bc11-f00f48746686
📒 Files selected for processing (6)
providers/azure/provider.goproviders/azure/provider_test.goproviders/azure/services.goproviders/azure/services/managedredis/client.goproviders/azure/services/managedredis/client_test.goproviders/azure/services_test.go
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
🧹 Nitpick comments (3)
providers/azure/services/managedredis/client_test.go (1)
171-179: 💤 Low valueUse
context.Background()instead ofnilcontext.Line 173 passes
nilas the context toGetValidResourceTypes. While this may work in tests where the context isn't deeply used, it's inconsistent with other tests and could cause issues if the implementation changes to use context features.Suggested fix
func TestGetValidResourceTypes_Fallback(t *testing.T) { c := NewClient(nil, "invalid-sub", "eastus") - skus, err := c.GetValidResourceTypes(nil) + skus, err := c.GetValidResourceTypes(context.Background()) require.NoError(t, err)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@providers/azure/services/managedredis/client_test.go` around lines 171 - 179, In TestGetValidResourceTypes_Fallback replace the nil contexts with context.Background() so both the NewClient call and the c.GetValidResourceTypes call use a real context; update NewClient(nil, "invalid-sub", "eastus") and c.GetValidResourceTypes(nil) to use context.Background() to match other tests and avoid passing nil into NewClient and GetValidResourceTypes.providers/azure/services/managedredis/client.go (2)
107-123: 💤 Low valuePricing API pagination not implemented.
AzureRetailPricehas aNextPageLinkfield, butgetRedisPricingonly processes the first page. If the API returns paginated results for a SKU query, some pricing items may be missed, potentially causing incorrect cost calculations.Also applies to: 452-477
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@providers/azure/services/managedredis/client.go` around lines 107 - 123, AzureRetailPrice's NextPageLink is ignored by getRedisPricing causing only the first page of pricing to be used; update getRedisPricing to follow pagination: after the initial request parse AzureRetailPrice, append its Items to a cumulative slice, then while AzureRetailPrice.NextPageLink is non-empty perform additional GET requests to that NextPageLink (using the same HTTP client/context used in the file), unmarshal each page into AzureRetailPrice, append Items, and continue until NextPageLink is empty or an error occurs; ensure errors are handled and aggregated count/Items are used for final pricing calculations.
516-527: 💤 Low valueCurrency and price extraction may be inconsistent with mixed items.
parsePriceItemsoverwritescurrencywith any non-emptyCurrencyCodeand takes the first matchingReservationTerm/Consumptionprice. If the API returns items with different currencies or multiple matching prices, the result could be unexpected.Consider filtering items by a consistent currency first, or validating that all items share the same currency.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@providers/azure/services/managedredis/client.go` around lines 516 - 527, The loop in parsePriceItems lets currency be overwritten by any non-empty CurrencyCode and picks the first matching ReservationTerm or Consumption price, which can produce inconsistent results when items have mixed currencies; update parsePriceItems to first determine a single consistent currency (e.g., pick the most common CurrencyCode or require all non-empty CurrencyCode values to match) and then filter items to that currency before setting currency, reservation, and onDemand; if mixed currencies are detected, log or return an error/warning so callers know the data is inconsistent. Use the existing symbols items, CurrencyCode, ReservationTerm, Type, currency, reservation, and onDemand to locate and implement this logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@providers/azure/services/managedredis/client_test.go`:
- Around line 171-179: In TestGetValidResourceTypes_Fallback replace the nil
contexts with context.Background() so both the NewClient call and the
c.GetValidResourceTypes call use a real context; update NewClient(nil,
"invalid-sub", "eastus") and c.GetValidResourceTypes(nil) to use
context.Background() to match other tests and avoid passing nil into NewClient
and GetValidResourceTypes.
In `@providers/azure/services/managedredis/client.go`:
- Around line 107-123: AzureRetailPrice's NextPageLink is ignored by
getRedisPricing causing only the first page of pricing to be used; update
getRedisPricing to follow pagination: after the initial request parse
AzureRetailPrice, append its Items to a cumulative slice, then while
AzureRetailPrice.NextPageLink is non-empty perform additional GET requests to
that NextPageLink (using the same HTTP client/context used in the file),
unmarshal each page into AzureRetailPrice, append Items, and continue until
NextPageLink is empty or an error occurs; ensure errors are handled and
aggregated count/Items are used for final pricing calculations.
- Around line 516-527: The loop in parsePriceItems lets currency be overwritten
by any non-empty CurrencyCode and picks the first matching ReservationTerm or
Consumption price, which can produce inconsistent results when items have mixed
currencies; update parsePriceItems to first determine a single consistent
currency (e.g., pick the most common CurrencyCode or require all non-empty
CurrencyCode values to match) and then filter items to that currency before
setting currency, reservation, and onDemand; if mixed currencies are detected,
log or return an error/warning so callers know the data is inconsistent. Use the
existing symbols items, CurrencyCode, ReservationTerm, Type, currency,
reservation, and onDemand to locate and implement this logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 20f35628-e74f-4ded-b552-54e6855ddfe0
📒 Files selected for processing (2)
providers/azure/services/managedredis/client.goproviders/azure/services/managedredis/client_test.go
|
@coderabbitai resolve |
✅ Actions performedComments resolved. Approval is disabled; enable |
cfd6a36 to
d3a54a2
Compare
CR findings addressedFirst review pass (4 actionable, all fixed in commit 108b736):
Second review pass (2 actionable, fixed in commit d3a54a2; 2 dismissed):
@coderabbitai review |
|
Triggering a fresh review now to pick up the latest commits. (◕‿◕✿)🐇 ✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
providers/azure/services/managedredis/client_test.go (2)
389-400: ⚡ Quick winStrengthen the 3-year offering test to validate term-specific pricing selection.
TestGetOfferingDetails_3yrcurrently uses fixture data with only"1 Years"reservation pricing, so it does not actually verify 3-year matching logic. Add a fixture item for"3 Years"and assert expected 3-year-derived values.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@providers/azure/services/managedredis/client_test.go` around lines 389 - 400, TestGetOfferingDetails_3yr is not actually exercising 3-year logic because the samplePricingJSON fixture only contains "1 Years" pricing; update the test so the fixture returned by samplePricingJSON (used in TestGetOfferingDetails_3yr via NewClientWithHTTP and the mockHTTPClient Do call) includes a pricing entry with "3 Years" term and appropriate price values, then assert that GetOfferingDetails(context.Background(), common.Recommendation{ResourceType:"Premium_P1", Term:"3yr", PaymentOption:"monthly"}) returns details.Term == "3yr", UpfrontCost == expected (e.g., 0) and RecurringCost matches the "3 Years" price (use the exact expected float value from the new fixture) to ensure term-specific selection is validated.
253-256: ⚡ Quick winUse non-nil context in
TestValidateOffering_InvalidSKU.Line 255 passes
nilas context, which is non-idiomatic for Go tests and can hide context-related failures. Prefercontext.Background().Suggested fix
func TestValidateOffering_InvalidSKU(t *testing.T) { c := NewClient(nil, "sub", "eastus") - err := c.ValidateOffering(nil, common.Recommendation{ResourceType: "Bogus_Z99"}) + err := c.ValidateOffering(context.Background(), common.Recommendation{ResourceType: "Bogus_Z99"}) require.Error(t, err) assert.Contains(t, err.Error(), "invalid Azure Cache for Redis SKU") }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@providers/azure/services/managedredis/client_test.go` around lines 253 - 256, Replace the nil context in the test TestValidateOffering_InvalidSKU with a proper non-nil context (e.g., context.Background()) when calling c.ValidateOffering; locate the test function TestValidateOffering_InvalidSKU and change the call c.ValidateOffering(nil, common.Recommendation{ResourceType: "Bogus_Z99"}) to use context.Background() so NewClient/ValidateOffering receive a real context for the assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@providers/azure/services/managedredis/client_test.go`:
- Around line 374-430: Add verification that the mockHTTPClient expectations
were met in every test that sets h.On("Do", ...) but currently doesn't assert
them: update TestGetOfferingDetails_1yr, TestGetOfferingDetails_3yr,
TestGetOfferingDetails_NoUpfront, TestGetOfferingDetails_APIError,
TestGetOfferingDetails_NoPricing (and the PurchaseCommitment tests below) to
call h.AssertExpectations(t) at the end of each test (or register
t.Cleanup(func(){ h.AssertExpectations(t) })) so the mocked Do invocation
defined on the mockHTTPClient is enforced for functions NewClientWithHTTP and
GetOfferingDetails.
In `@providers/azure/services/managedredis/client.go`:
- Around line 365-373: The current code returns whatever partial skuSet
collectSKUsFromPager produced even when the pager encountered an error; change
collectSKUsFromPager to return an error (e.g., func collectSKUsFromPager(ctx,
pager) (map[string]struct{}, error)) and have the caller check that error before
converting skuSet to a slice; on error, discard partial results and return
c.commonSKUs(), nil instead of continuing with partial data. Update both call
sites that build skus from skuSet (the blocks creating skus slice and returning
skus) to handle the new error return and fall back to c.commonSKUs() when
collectSKUsFromPager returns an error. Ensure unique symbols referenced:
collectSKUsFromPager, skuSet, skus, and c.commonSKUs().
- Around line 73-79: NewClientWithHTTP currently stores a nil HTTPClient
directly which can cause a panic later; update NewClientWithHTTP to check if the
provided httpClient is nil and replace it with the package's default HTTPClient
(or http.DefaultClient) before assigning to the ManagedRedisClient field so
ManagedRedisClient.httpClient is never nil; reference the NewClientWithHTTP
constructor and the ManagedRedisClient.httpClient/HTTPClient types when making
the change.
- Around line 548-563: The code currently creates a local recurringCost float
and always returns a non-nil pointer for Recommendation.RecurringMonthlyCost,
losing the nil/missing distinction; change the mapping to pass
f.RecurringMonthlyCost directly into the returned common.Recommendation (i.e.,
set RecurringMonthlyCost: f.RecurringMonthlyCost) instead of creating a
zero-valued pointer via recurringCost so the field stays nil when unavailable
(look for the code building the common.Recommendation in client.go that
references f.RecurringMonthlyCost and recurringCost).
---
Nitpick comments:
In `@providers/azure/services/managedredis/client_test.go`:
- Around line 389-400: TestGetOfferingDetails_3yr is not actually exercising
3-year logic because the samplePricingJSON fixture only contains "1 Years"
pricing; update the test so the fixture returned by samplePricingJSON (used in
TestGetOfferingDetails_3yr via NewClientWithHTTP and the mockHTTPClient Do call)
includes a pricing entry with "3 Years" term and appropriate price values, then
assert that GetOfferingDetails(context.Background(),
common.Recommendation{ResourceType:"Premium_P1", Term:"3yr",
PaymentOption:"monthly"}) returns details.Term == "3yr", UpfrontCost == expected
(e.g., 0) and RecurringCost matches the "3 Years" price (use the exact expected
float value from the new fixture) to ensure term-specific selection is
validated.
- Around line 253-256: Replace the nil context in the test
TestValidateOffering_InvalidSKU with a proper non-nil context (e.g.,
context.Background()) when calling c.ValidateOffering; locate the test function
TestValidateOffering_InvalidSKU and change the call c.ValidateOffering(nil,
common.Recommendation{ResourceType: "Bogus_Z99"}) to use context.Background() so
NewClient/ValidateOffering receive a real context for the assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9a129400-45b0-4868-9fb7-f827343daff8
📒 Files selected for processing (6)
providers/azure/provider.goproviders/azure/provider_test.goproviders/azure/services.goproviders/azure/services/managedredis/client.goproviders/azure/services/managedredis/client_test.goproviders/azure/services_test.go
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
31c88ae to
2f73e2b
Compare
|
Rebased onto latest feat/multicloud-web-frontend. Conflicts in providers/azure/provider.go (GetSupportedServices list + GetServiceClient switch) and providers/azure/services.go (import list + factory funcs) where this branch's ServiceMemoryDB / NewManagedRedisClient additions had to be merged alongside the recently-landed ServiceSavingsPlans + ServiceSearch additions from #592. Both sides preserved; all 464 azure-module tests pass locally. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
…client (closes #556) Add providers/azure/services/managedredis as Azure's counterpart to AWS MemoryDB. Azure Cache for Redis is the closest Azure equivalent: a fully- managed in-memory caching service with reservation-based pricing via the Azure Consumption and Retail Prices APIs. The new client registers under ServiceMemoryDB so it is routed and reported symmetrically with the AWS MemoryDB client at the provider-dispatch level. It reuses the armredis/v3 and armconsumption SDK packages already present in the azure provider module - no new dependencies. Changes: - providers/azure/services/managedredis/client.go: new ManagedRedisClient implementing the full provider.ServiceClient interface (GetRecommendations, GetExistingCommitments, PurchaseCommitment, ValidateOffering, GetOfferingDetails, GetValidResourceTypes) - providers/azure/services/managedredis/client_test.go: 34 tests covering all methods, pager injection, HTTP mock, token error, SKU fallback - providers/azure/services.go: NewManagedRedisClient factory - providers/azure/provider.go: ServiceMemoryDB in GetSupportedServices and newServiceClientForSubscription switch - providers/azure/services_test.go: TestNewManagedRedisClient - providers/azure/provider_test.go: ServiceMemoryDB assertions in GetSupportedServices and AllServiceTypes tests
…r discovery, UUID, recommendation mapping - Propagate pager-creation and NextPage errors in GetExistingCommitments instead of swallowing them (return nil, err rather than empty slice or silent break) - Replace hardcoded zero-UUID order ID in reservationDetailsPager with the subscription-scope NewListPager so all real reservation orders are enumerated; update ReservationsDetailsPager interface to ListResponse (not ByReservationOrder) - Use uuid.New().String() for PurchaseCommitment reservation order ID to avoid second-level collisions under concurrent purchases - Replace static stub in convertRecommendation with recommendations.Extract so all Azure recommendation fields (SKU, count, cost, region, term) are mapped - Update tests: pager mock type, pager-error case now asserts error, new convertRecommendation tests cover nil and legacy recommendation shapes
- Follow NextPageLink in getRedisPricing so all pricing pages are consumed rather than only the first response - Replace nil context with context.Background() in TestGetValidResourceTypes_Fallback - Add TestGetOfferingDetails_Paginated to exercise the multi-page fetch path end-to-end
…indings - Guard NewClientWithHTTP against a nil HTTPClient by substituting a default *http.Client with a 30s timeout, avoiding nil-deref panics on the first Do call. - Change collectSKUsFromPager to return (map, error) and have GetValidResourceTypes discard partial results and fall back to the curated commonSKUs() list on pager error, preventing false validation failures for valid SKUs. - Pass the converter's *float64 RecurringMonthlyCost through directly so nil (the documented "provider did not return a monthly breakdown" sentinel in pkg/common/types.go) stays distinct from an explicit 0.
…er CR
- Register h.AssertExpectations(t) via t.Cleanup on every test using
mockHTTPClient (TestGetOfferingDetails_{1yr,3yr,NoUpfront,APIError,
NoPricing} and TestPurchaseCommitment_*), so the mocked Do call is
required to fire instead of being silently optional.
- Add a "3 Years" reservation entry to samplePricingJSON and assert the
exact recurring/total cost in TestGetOfferingDetails_3yr so the test
actually exercises 3-year term selection rather than just asserting
RecurringCost > 0 against the 1-year fixture.
- Replace nil context with context.Background() in
TestValidateOffering_InvalidSKU for consistency with other tests.
…servation price - Add parseTermYears helper (mirrors synapse) to reject any term string outside the explicit "1yr"/"3yr" allowlist instead of silently defaulting to 1 year in PurchaseCommitment and GetOfferingDetails - Remove hardcoded 45% reservation-price fallback in getRedisPricing; return an error when the API returns no reservation price for the requested SKU - Add TestPurchaseCommitment_InvalidTerm and TestGetOfferingDetails_InvalidTerm to exercise the new error paths
2f73e2b to
fab11b6
Compare
CR pass-3 responseAll four pass-3 findings have been addressed in the commits already on this branch (fd519d2 + 9c74d47). Summary:
Test run: 38/38 pass ( @coderabbitai review |
|
Triggering review to pick up fd519d2 + 9c74d47. (◕‿◕✿)🐇 ✅ Actions performedReview triggered.
|
|
All 4 actionable CodeRabbit findings verified against HEAD (fab11b6) and already resolved before merge:
Tests: 38 passed, @coderabbitai review |
|
Triggering the requested review to confirm no new issues surfaced in the rebase commits. (◕‿◕✿)🐰✨ ✅ Actions performedReview triggered.
|
Summary
providers/azure/services/managedredisas Azure's counterpart to AWS MemoryDB for Redis (AWS → Azure Feature Parity Gaps #473 parity gap)ManagedRedisClientregisters underServiceMemoryDBso it is routed and reported symmetrically with the AWS MemoryDB client at the provider-dispatch levelarmredis/v3andarmconsumptionSDK packages - no new dependenciesChanges
providers/azure/services/managedredis/client.go: newManagedRedisClientimplementing the fullprovider.ServiceClientinterface (GetRecommendations, GetExistingCommitments, PurchaseCommitment, ValidateOffering, GetOfferingDetails, GetValidResourceTypes)providers/azure/services/managedredis/client_test.go: 34 tests covering all methods, pager injection, HTTP mock, token error paths, SKU fallbackproviders/azure/services.go:NewManagedRedisClientfactory functionproviders/azure/provider.go:ServiceMemoryDBadded toGetSupportedServices()andnewServiceClientForSubscription()switchproviders/azure/services_test.go:TestNewManagedRedisClientproviders/azure/provider_test.go:ServiceMemoryDBassertions inGetSupportedServicesandAllServiceTypestestsTest plan
go test ./providers/azure/services/managedredis/... -count=1 -short: 34 passedgo test ./... -count=1 -short(azure module): 426 passed across 11 packagesgo build ./...: cleango mod tidy: cleanCloses #556
Refs #473
Summary by CodeRabbit
New Features
Tests